<?php
namespace app\servershoppingcart\model;

use \app\manage\model\BaseModel;
/**
 * @author:      李颖
 * @DateTime:    2017-10-11 14:12:09
 * @Description: 购物车模型
 */
class Shoppingcart extends BaseModel
{
	protected $name = 'shoppingcart';
    protected $connection = 'db_config_shoppingcart';
    protected $dateFormat = 'Y-m-d';
    protected $append = [];
   

    public function setGoodsInfoAttr($value, $data)
    {
        return json_encode($data['goods_info']);
    }
   
    public function getGoodsInfoAttr($value,$data)
    {
        return json_decode($data['goods_info'], true);
    }

    public function setOrtherPriceAttr($value, $data)
    {
        return json_encode($data['orther_price']);
    }
   
    public function getOrtherPriceAttr($value,$data)
    {
        return json_decode($data['orther_price'], true);
    }


}